/* eslint-disable @typescript-eslint/no-empty-function */
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable prefer-rest-params */
/* eslint-disable func-style */
/* eslint-disable @typescript-eslint/no-unsafe-function-type */
import "reflect-metadata";

const Decorator = function (kind: string): any {
  console.log("Args", arguments);
  return function (target: Function) {
    console.log("innerArgs", arguments);
    if (kind === "propertyDecorator") {
      console.log(
        "metadatakey",
        Reflect.getMetadata(target.prototype, "scope:context"),
      );
    }
  };
};
// Next Decorator
type deco = DecoratorContext;

@Decorator("classDecorator")
class A {
  @Reflect.metadata("scope:context", (scope: string) => {})
  @Decorator("propertyDecorator")
  foo: number;

  @Decorator("methodDecorator")
  bar() {}

  @Decorator("staticMethodDecorator")
  static staticMethod(@Decorator("parameterDecorator") p: number) {}

  constructor(@Decorator("constructorDecorator") foo: number) {
    this.foo = foo;
  }

  @Decorator("propertyDecoratorWithDefault")
  bat = 1;
}
const a = new A(0);
Reflect.getMetadata("scope:context", A.prototype, "foo");
Reflect.getMetadataKeys(A.prototype, "bar");

// =>  'scope:context'

function id<const T>(a: T) {
  return a;
}
const b = [1] as const satisfies unknown[];
